import request from '@/utils/request'

// 查询题库列表
export function listQuestionBank(query) {
  return request({
    url: '/exam/questionBank/list',
    method: 'get',
    params: query
  })
}
// 查询题库列表
export function getQuestionBankAllList() {
  return request({
    url: '/exam/questionBank/allList',
    method: 'get'
  })
}

export function allListNotInIds(ids) {
  return request({
    url: '/exam/questionBank/allListNotInIds?ids='+ids,
    method: 'get'
  })
}

// 查询题库详细
export function getQuestionBank(id) {
  return request({
    url: '/exam/questionBank/' + id,
    method: 'get'
  })
}

// 新增题库
export function addQuestionBank(data) {
  return request({
    url: '/exam/questionBank',
    method: 'post',
    data: data
  })
}

// 修改题库
export function updateQuestionBank(data) {
  return request({
    url: '/exam/questionBank',
    method: 'put',
    data: data
  })
}

// 删除题库
export function delQuestionBank(id) {
  return request({
    url: '/exam/questionBank/' + id,
    method: 'delete'
  })
}
